window.onload = function () {
    var xhr = new XMLHttpRequest()
    xhr.open('get', '/studio/album/add.json' + location.search)
    xhr.onload = function () {
        var data = JSON.parse(xhr.responseText)
        console.log(data)
        document.querySelector('#aid').value = data.aid;
        var container = document.querySelector('.container');
        for (var i in data.trackViewList) {
            var TrackView = data.trackViewList[i]
            var html = `<div><input type="checkbox" name="add-tid" value="${TrackView.tid}">${TrackView.title}</div>`
            container.innerHTML += html
        }
    }
    xhr.send()
}